<script setup>
import {computed, onMounted, ref} from "vue";
import {useRouterStore} from "@/stores/index.js";
import SidebarItem from "@/views/home/components/sidebarItem.vue";

import {useRoute} from "vue-router";


const isCollapse = ref(true)
const routerStore = useRouterStore()

const menuList = computed(() => {
  return  routerStore.getDynamicRoutes()
})
const route = useRoute()
const active = computed(() => {
   return route.path
})

</script>

<template>
  <el-scrollbar class="avue-menu">
  <el-menu unique-opened

           mode="vertical"
           :router="true"


           :default-active="active"
           :collapse="isCollapse.value">
    <sidebar-item :menu="menuList" ></sidebar-item>

  </el-menu>
  </el-scrollbar>
</template>

<style scoped lang="scss">

</style>